Memory is widely used to store information (both data and program) in a digital system. During the operation of the system, information (bits) stored in the memory may be corrupted due to various reasons. One possible cause of the corruption is due to environmental events both internal to the memory and outside of the memory. One such outside event is a particle strike. There are other reasons which cause the corruption (failure) of bits besides environmental events. When a bit is corrupted, information stored is lost resulting system failure or data lost. Therefore it is important to protect the integrity of the memory content.
Various means for protecting the memory content from corruption have been used. Error correction codes (ECC) have the advantage of being able to detect errors in a data field, and also to correct errors. However, medium, such as memory, used in a system may need to go through different phases where the operation condition may be different, for example the ambient temperature. In particular, data retention may become weaker at higher temperature in this example. As such, there is a need to protect the data content with a stronger ECC scheme in some phases.